//
//  ICMRepairMaintenanceModel.h
//  ICrEAM
//
//  Created by FoREVer_SaD on 16/10/28.
//  Copyright © 2016年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ICMProxyMaintenanceAndPartsView.h"

@class ICMMaintenanceAndPartsView;
@class ICMAppointmentMaintenanceAndPartsView;
@class ICMProxyMaintenanceAndPartsView;

typedef enum{
    RepairMaintenanceEditTypeDefualt = 0,
    RepairMaintenanceEditTypeAdd = 1,
    RepairMaintenanceEditTypeDelete = 2,
    RepairMaintenanceEditTypeUpdate = 3,
}RepairMaintenanceEditType;

@interface ICMRepairMaintenanceModel : NSObject<YYModel>

//查询需要的字段
@property (nonatomic, copy) NSString *LABOUR_ID;//id
@property (nonatomic, strong) NSString *LABOUR_CODE;//项目代码
@property (nonatomic, strong) NSString *LABOUR_NAME;//项目名称
@property (nonatomic, strong) NSString *OFFSET_DESC;//偏离值
@property (nonatomic, strong) NSString *STD_LABOUR_HOUR;//执行工时



@property (nonatomic, strong) NSString *REPAIR_ITEM_TYPE_RATE;//工位类型系数
@property (nonatomic, strong) NSString *TECHNIC_MODULUS;//技术难度系数
@property (nonatomic, strong) NSString *SERIES_LABOUR_PRICE;//车系工时单价
@property (nonatomic, strong) NSString *STD_LABOUR_PRICE;//标准工时
//@property (nonatomic, strong) NSString *VIEW_STD_LABOUR_HOUR;//执行工时
@property (nonatomic, strong) NSString *OEM_TAG;//OEM_TAG
@property (nonatomic, strong) NSString *workingHoursPrice;//工时单价******
@property (nonatomic, copy) NSString *LABOUR_HOUR_EDIT;//是否可编辑 12781002不可编辑

//后台提供字段和需要提交的字段
@property (nonatomic, strong) NSString *REPAIR_ITEM_ID;//项目ID

//提交还需要的字段
@property (nonatomic, strong) NSString *LABOUR_PRICE;//工时单价
@property (nonatomic, copy) NSString *LABOUR_AMOUNT;//工时费

@property (nonatomic, strong) NSString *REPAIR_TYPE_CODE;//维修类型
@property (nonatomic, strong) NSString *REPAIR_TYPE_NAME;//维修名称
@property (nonatomic, strong) NSString *TROUBLE_DESC;//故障描述
@property (nonatomic, strong) NSString *UPDATE_STATUS;//增删改标志
@property (nonatomic, strong) NSString *ASSIGN_TAG; //是否可以删除

@property (nonatomic, strong) NSString *REPAIR_ITEM_EX_ID;//保存时的项目ID

//
@property (nonatomic, copy) NSString *ITEM_ID;//项目id

@property (nonatomic, assign) double DISCOUNT;//折扣率
@property (nonatomic, copy) NSString *DISCOUNT_RATE;
@property (nonatomic, strong) NSString *DISCOUNT_AMOUNT;//折后金额

@property (nonatomic, assign) BOOL isDiscount;
@property (nonatomic, strong) NSString *IS_DISCOUNT;//是否打折
@property (nonatomic, strong) NSString *ACTIVITY_NO;//活动code

//编辑类型
@property (nonatomic, assign) RepairMaintenanceEditType editType;

@end

            
@interface ICMRepairMaintenancesModel : NSObject<YYModel>
//接车
@property (nonatomic, strong) NSMutableArray *TT_RECPTION_LABOUR;
//预约
@property (nonatomic, strong) NSMutableArray *TT_BOOKING_ORDER_LABOUR;
//委托
@property (nonatomic, strong) NSMutableArray *TT_RO_LABOUR;
//管理工位
@property (nonatomic, strong) NSMutableArray *TT_RO_GLGW_LABOUR;

- (void)setupRepairMaintenancesModelWithPartsView:(ICMMaintenanceAndPartsView*)partsView;


-(void)setupRepairMaintenancesModelWithArray:(NSArray *)array;


- (void)setupRepairMaintenancesModelWithAppointmentPartsView:(ICMAppointmentMaintenanceAndPartsView *)partsView;
- (void)setupRepairMaintenancesModelWithRoPartsView:(ICMProxyMaintenanceAndPartsView *)partsView;
//根据view里面项目生成model 不包括删除的项目
- (void)setupRepairMaintenancesModelWithRoPartsViewWithoutDelItems:(ICMProxyMaintenanceAndPartsView *)partsView;

- (void)createRepairMaintenanceModel;
- (void)createRepairMaintenanceBookingModel;
- (void)createRepairMaintenanceRoModel;
@end








